﻿using MauiApp5.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MauiApp5.Controls
{
    public class UserGenderDataTemplateSelector : DataTemplateSelector
    {
        public DataTemplate Female { get; set; }
        public DataTemplate Male { get; set; }
        protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
        {
            return ((UserIonf)item).Gender.Contains("女") ? Female : Male;
        }
    }
}
